﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using LocalDBDemo;

namespace Family.View
{
    public partial class SearchNomal : PhoneApplicationPage
    {
        public SearchNomal()
        {
            InitializeComponent();
            DBHelper.MoveReferenceDatabase();
            DBHelper.CreateDatabase();
            (Application.Current as App).categoryList = DBHelper.GetAllCategory();
            (Application.Current as App).countryList = DBHelper.GetAllCountry();            
        }

        private void mitAbout_Click(object sender, System.EventArgs e)
        {			
            MessageBox.Show("Chương trình Vào Bếp \r\n Chương trình giúp các bạn vào bếp \r\n một cách thật hightech \r\n Hãy cùng trải nghiệm !!! \r\n \r\n \r\n Develop group : Hutech - HCMUS \r\n Member : \r\n   Nguyễn Thành Đạt \r\n   Nguyễn Đắc Bình Minh \r\n   Đặng Hoàng Long \r\n   Trần Đình Khôi \r\n   Nguyễn Thị Nguyệt","Thông Tin", MessageBoxButton.OK);// TODO: Add event handler implementation here.
        }

        private void btnFilter_Click(object sender, System.EventArgs e)
        {
           this.NavigationService.Navigate(new Uri("/View/Filter.xaml", UriKind.Relative));
        }

        private void btnAdd_Click(object sender, System.EventArgs e)
        {
        	this.NavigationService.Navigate(new Uri("/View/AddNew.xaml", UriKind.Relative));
        }

        private void btnSeach_Click(object sender, System.EventArgs e)
        {
        	// TODO: Add event handler implementation here.
        }

        private void ltbFoodList_Tap(object sender, System.Windows.Input.GestureEventArgs e)
        {
        	// TODO: Add event handler implementation here.	
            (Application.Current as App).foodChoose = (Food)ltbFoodList.SelectedItem;
            NavigationService.Navigate(new Uri("/View/Food.xaml", UriKind.Relative));
        }

        private void ltbDrinkList_Tap(object sender, System.Windows.Input.GestureEventArgs e)
        {
        	// TODO: Add event handler implementation here.
            (Application.Current as App).foodChoose = (Food)ltbFoodList.SelectedItem;
            NavigationService.Navigate(new Uri("/View/Food.xaml", UriKind.Relative));
        }
    }
}